package com.dragon.logical.service.finance;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.repository.entity.AddPageData;
import com.dragon.repository.entity.Payment;
import com.dragon.repository.entity.PaymentObject;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 付款 服务类
 * </p>
 *
 * @author sy
 * @since 2023-11-08
 */
public interface IPaymentService extends IService<Payment> {

    /**
     * 分页
     * @param page
     * @param limit
     * @param search
     * @param status
     * @return
     */
    Page<Payment> paymentList(Integer page, Integer limit, String search, Integer status, Integer paymentStatus, String startTime, String endTime);

    /**
     * 添加
     * @param payment
     * @return
     */
    AddPageData addPayment(Payment payment);

    /**
     * 修改
     * @param payment
     */
    void updatePayment(Payment payment);

    /**
     * 删除
     * @param id
     */
    void deletePayment(Integer id);

    /**
     * 详情
     * @param id
     * @return
     */
    Payment getPaymentById(Integer id);

    /**
     * 付款反审核操作
     * @param correlationId
     */
    void antiAudit(Integer correlationId);

    /**
     * 付款操作
     * @param convert
     */
    void paymentOperate(Payment convert);

    /**
     * 付款统计
     * @return
     */
    Map<String,Object> listStatistics();

    /**
     * 付款类型占比
     * @param time
     * @return
     */
    List<PaymentObject> paymentTypePercentage(String time);

    /**
     * 付款月总额统计
     * @param time
     * @return
     */
    LinkedHashMap<String, Object> paymentTotalStatistics(String time);
}
